
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using ArgosMembership.Enums;
namespace ArgosMembership.Modelo
{

    [Table("UsuarioForma")]
    public partial class UsuarioForma
    {
        [Key, Column(Order = 0)]
        public int UsuarioId { get; set; }

        [Key, Column(Order = 1)]
        public int FormaId { get; set; }

        [Column("Permisos")]
        public byte InternalPermisos { get; set; }
        [NotMapped]
        public Privilegios Permisos
        {
            get { return (Privilegios)this.InternalPermisos; }
            set { this.InternalPermisos = (byte)value; }
        }
        

        [ForeignKey("UsuarioId")]
        public virtual Usuario Usuario { get; set; }
        [ForeignKey("FormaId")]
        public virtual Forma Forma { get; set; }
    }
}
